/**
 * @Author: 陈瑞鹏
 * @Date:   2022-11-25 15:04:22
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-12-05 16:40:29
 */
const { ccclass, property } = cc._decorator;

@ccclass

export default class descComp extends cc.Component {

  @property({ type: cc.Node, tooltip: "名称节点" })
  nameNode: cc.Node = null;

  @property({ type: cc.Label, tooltip: "名字" })
  nameTxt: cc.Label = null;

  @property({ type: cc.Label, tooltip: "金币数量" })
  goldNum: cc.Label = null;

  @property({ type: cc.Label, tooltip: "描述" })
  descTxt: cc.Label = null;

  protected onEnable(): void {

  }

  drawUi(data, pos) {
    this.nameNode.x = pos.x;
    this.nameTxt.string = data.name;
    this.goldNum.string = `${data.need}`;
    this.descTxt.string = `${data.desc}`;
  }
}